<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core">

<h:head>
	<title>Solicitações</title>
</h:head>
<h:body>

	<ui:composition template="template.xhtml">

		<ui:define name="template_title">
       Inclusão de Solicitações
      </ui:define>

		<ui:define name="page_content">
			<h:form id="form">

				<p:panel id="panel" header="Nova Solicitacao"
					style="margin-bottom:10px;">
					<!-- <p:messages id="messages" /> -->
					<h:panelGrid columns="3">

						<h:outputLabel for="solicitacaoID" value="ID Solicitação: *" />
						<p:inputText id="solicitacaoID"
							value="#{solicitacaoBean.solicitacao.id}" required="true"
							label="solicitacao">
						</p:inputText>
						<p:message for="solicitacaoID" />

						<h:outputLabel for="descricaoID" value="Descrição *" />
						<p:inputText id="descricaoID"
							value="#{solicitacaoBean.solicitacao.descricao}" required="true"
							label="descricao">
						</p:inputText>
						<p:message for="descricaoID" />
					</h:panelGrid>
				</p:panel>

				<h:outputText value="Projetos Impactados: " />
				<p:selectManyCheckbox id="projetoListID"
					value="#{solicitacaoBean.solicitacao.projetos}" layout="grid"
					columns="3" converter="projeto.converter">
					<f:selectItems value="#{solicitacaoBean.listAllProjetos}" var="projeto" itemLabel="#{projeto.nome}"/>
				</p:selectManyCheckbox>
				<p:message for="projetoListID" />

				<p:commandButton value="Enviar" update="panel" id="ajax"
					actionListener="#{solicitacaoBean.incluir}"
					styleClass="ui-priority-primary" />
			</h:form>
		</ui:define>
	</ui:composition>
</h:body>

</html>